package org.tgit.gateway.domain;

import java.io.Serializable;
import java.util.Date;
/**
 * 传输消息的对象
 * @author fanzaijun
 * 2017年6月27日
 */
public class MsgInfo implements Serializable {
	private static final long serialVersionUID = 4062830425306245652L;
	public static final String METHOD_POST = "POST";
	public static final String METHOD_GET = "GET";
	// 主键ID
	private String id;
	// 节点标识
	private String nodeId;
	// 日志ID
	private String logid;
	// 发送者ID
	private String sender;
	// 接收者ID
	private String receiver;
	// 学校的URL
	private String targetHost;
	// 发送消息的完整url
	private String targetUrl;
	// 接口的uri
	private String uri;
	// 当前消息重试次数
	private int tryTimes;
	// 接口协议
	private String method = METHOD_POST;
	// 消息内容
	private String content;
	// 当前消息的唯一标识
	private String uuid;
	// 接口调用异常的情况下返回给调用方的url
	private String rollbackUrl;
	// 下次执行时间
	private Date nextExecTime = new Date();

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getNodeId() {
		return nodeId;
	}

	public void setNodeId(String nodeId) {
		this.nodeId = nodeId;
	}

	public String getLogid() {
		return logid;
	}

	public void setLogid(String logid) {
		this.logid = logid;
	}

	public String getSender() {
		return sender;
	}

	public void setSender(String sender) {
		this.sender = sender;
	}

	public String getReceiver() {
		return receiver;
	}

	public void setReceiver(String receiver) {
		this.receiver = receiver;
	}

	public String getTargetHost() {
		return targetHost;
	}

	public void setTargetHost(String targetHost) {
		this.targetHost = targetHost;
	}

	public String getTargetUrl() {
		return targetUrl;
	}

	public void setTargetUrl(String targetUrl) {
		this.targetUrl = targetUrl;
	}

	public String getUri() {
		return uri;
	}

	public void setUri(String uri) {
		this.uri = uri;
	}

	public int getTryTimes() {
		return tryTimes;
	}

	public void setTryTimes(int tryTimes) {
		this.tryTimes = tryTimes;
	}

	public String getMethod() {
		return method;
	}

	public void setMethod(String method) {
		this.method = method;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getUuid() {
		return uuid;
	}

	public void setUuid(String uuid) {
		this.uuid = uuid;
	}

	public String getRollbackUrl() {
		return rollbackUrl;
	}

	public void setRollbackUrl(String rollbackUrl) {
		this.rollbackUrl = rollbackUrl;
	}

	public Date getNextExecTime() {
		return nextExecTime;
	}

	public void setNextExecTime(Date nextExecTime) {
		this.nextExecTime = nextExecTime;
	}
}
